package com.haierCamera.customapplication.ui;


import com.haierCamera.customapplication.R;
import com.haierCamera.customapplication.ui.user.MineFragment;

import androidx.fragment.app.FragmentManager;
import dagger.Module;
import dagger.Provides;
import dagger.android.ContributesAndroidInjector;

/**
 * @author yawei
 * @data on 2018/7/18 上午9:16
 * @email zyawei@live.com
 */
@Module
public abstract class MainModule {

    @ContributesAndroidInjector
    abstract HomeFragment HomeFragment();

    @ContributesAndroidInjector
    abstract MsgFragment msgFragment();

    @ContributesAndroidInjector
    abstract MineFragment mineFragment();

    @Provides
    static FragmentManager provideSupportFragment(MainActivity activity) {
        return activity.getSupportFragmentManager();
    }

    @Provides
    static int provideContainerId() {
        return R.id.container;
    }

}
